diff options
| author | Adam Soltys <[email protected]> | 2024-02-07 22:26:31 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-02-07 22:26:31 -0800 |
| commit | 896d24b3f24500a25a7ac4111357cee4e0390eae (patch) | |
| tree | 85ffc8f27a4e311dbcff0e8ec736c5d80265c09e /src/routes/(app)/[username]/(profile) | |
| parent | 598533905e1e148204775e3851cd873f61fa2d80 (diff) | |
| download | coinos-ui-896d24b3f24500a25a7ac4111357cee4e0390eae.tar.gz coinos-ui-896d24b3f24500a25a7ac4111357cee4e0390eae.zip | |
update nsec at submit time
Diffstat (limited to 'src/routes/(app)/[username]/(profile)')
| -rw-r--r-- | src/routes/(app)/[username]/(profile)/+page.svelte | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/routes/(app)/[username]/(profile)/+page.svelte b/src/routes/(app)/[username]/(profile)/+page.svelte index c52009a7..9dd968b6 100644 --- a/src/routes/(app)/[username]/(profile)/+page.svelte +++ b/src/routes/(app)/[username]/(profile)/+page.svelte @@ -22,7 +22,7 @@ let ready; e.subscribe(async (event) => { - if (!(event && ready)) return; + if (!(browser && event && ready)) return; if ( event.recipient?.id === user.id && !~latest.findIndex((m) => m.id === event.id) @@ -43,7 +43,7 @@ let initialize = async (p) => { let i = 0; ready = false; - if (!p || !user) return; + if (!(browser && user)) return; while (i < messages.length) { let event = messages[i]; i++; @@ -54,6 +54,7 @@ event.author.id === user.id ? event.recipient?.pubkey : event.author.pubkey; + if (!keys.has(k)) { keys.add(k); event.content = await decrypt({ event, user }); |
